package com.rightsidetech.system.mapper;

import com.rightsidetech.commom.base.PageRequest;
import com.rightsidetech.system.dtos.response.SysRoleDetailResp;
import com.rightsidetech.system.dtos.response.SysRoleResp;
import com.rightsidetech.system.dtos.response.SysRoleSelectResp;
import com.rightsidetech.system.entity.SysAgentRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysAgentRoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysAgentRole record);

    int insertSelective(SysAgentRole record);

    SysAgentRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysAgentRole record);

    int updateByPrimaryKey(SysAgentRole record);

    SysAgentRole selectByInfoId(Long infoId);

    List<SysRoleResp> selectAgentList(PageRequest req) throws Exception;

    List<SysRoleResp> selectList(PageRequest req, @Param("agentId") Long agentId) throws Exception;

    Long selectList_COUNT(PageRequest req, @Param("agentId") Long agentId) throws Exception;

    SysAgentRole selectByName(@Param("name") String name, @Param("agentId") Long agentId) throws Exception;

    SysRoleDetailResp selectByRoleId(@Param("roleId") Long roleId) throws Exception;

    List<SysRoleSelectResp> selectChooseList(Long agentId) throws Exception;

    List<Long> selectLongList(Long agentId);

    int selectAgentById(@Param("id") Long id);

    List<Long> selectIdByAgentId(Long agentId);

}